package com.yami.shop.webservice.common.service.impl;

import com.yami.shop.bean.model.TransactionVo;
import com.yami.shop.webservice.common.dao.SubmittedTransactionMapper;
import com.yami.shop.webservice.common.service.WapiSubmittedTransactionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class WapiSubmittedTransactionServiceImpl implements WapiSubmittedTransactionService {
    private final Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SubmittedTransactionMapper submittedTransactionMapper;

    @Override
    public int insertTransactionVoList(List<TransactionVo> transactionVoList) {
        for (TransactionVo transactionVo: transactionVoList) {
            transactionVo.setCreateTime(new Date());
        }
        return submittedTransactionMapper.insertTransactionVoList(transactionVoList);
    }
}
